package com.rjkj.medicalwaste.repository

import androidx.paging.Pager
import androidx.paging.PagingConfig
import androidx.paging.PagingData
import com.rjkj.medicalwaste.bean.TestBean
import com.rjkj.medicalwaste.paging.BoxListPagingSource
import kotlinx.coroutines.flow.Flow

object BoxListRepository {
    private const val PAGE_SIZE = 6

    fun getPagingData(int: Int): Flow<PagingData<TestBean>> {
        return Pager(
            config = PagingConfig(PAGE_SIZE),
            pagingSourceFactory = { BoxListPagingSource(int) }
        ).flow
    }
}